package com.kl.forum.service;

import com.kl.forum.dao.ArticleCommentReplyLightMapper;
import com.kl.forum.entity.ArticleCommentLight;
import com.kl.forum.entity.ArticleCommentReplyLight;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class ArticleCommentReplyLightService {

    @Autowired
    private ArticleCommentReplyLightMapper articleCommentReplyLightMapper;

    public ArticleCommentReplyLight findArticleCommentReplyLightRecord(Integer replyId, Integer userId){
        Map map=new HashMap();
        map.put("replyId",replyId);
        map.put("userId",userId);
        return articleCommentReplyLightMapper.findArticleCommentReplyLightRecord(map);
    }
    public int insert(ArticleCommentReplyLight articleCommentReplyLight){
        return articleCommentReplyLightMapper.insertSelective(articleCommentReplyLight);
    }
    public  int update(ArticleCommentReplyLight articleCommentReplyLight ){
        return articleCommentReplyLightMapper.updateByPrimaryKeySelective(articleCommentReplyLight);
    }
}
